<?php

namespace Common\Bundle\LibraryBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;

/**
 * Statistique
 *
 * @ORM\Table("statistique")
 * @ORM\Entity(repositoryClass="Common\Bundle\LibraryBundle\Entity\Repository\StatistiqueRepository")
 */
class Statistique
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="note", type="string", length=255)
     * @Assert\NotBlank()
     */
    private $note;

     /**
     * @var Date
     *
     * @ORM\Column(name="date", type="bigint")
     */
    private $date;

    /**
     * @var User
     *
     * @ORM\ManyToOne(targetEntity="\Common\Bundle\UserBundle\Entity\User", inversedBy="statistiques", cascade={"persist"})
     */
    private $user;

     /**
     * @var Qcm
     *
     * @ORM\ManyToOne(targetEntity="\Common\Bundle\LibraryBundle\Entity\Qcm", cascade={"persist"})
     */
    private $qcm;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set note
     *
     * @param string $note
     * @return Statistique
     */
    public function setNote($note)
    {
        $this->note = $note;

        return $this;
    }

    /**
     * Get note
     *
     * @return string 
     */
    public function getNote()
    {
        return $this->note;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Statistique
     */
    public function setDate($date)
    {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
    * @param \Common\Bundle\UserBundle\Entity\User $user
    */
    public function setUser($user)
    {
        $this->user = $user;
    }
  
    /**
     * @return \Common\Bundle\UserBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }

     /**
     * Set qcms
     *
     * @param \Doctrine\Common\Collections\Collection $qcm
     */
    public function setQcm($qcm)
    {
        $this->qcm = $qcm;

        return $this;
    }

    /**
     * Get qcms
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getQcm()
    {
        return $this->qcm;
    }

}
